<template>
<!-- el分页 -->
  <el-pagination
    background
    small
    layout="prev, pager, next"
    :total="total"
    :page-size="pageSize"
    :current-page="pagenum"
    hide-on-single-page
    @current-change="handleSizeClick"
  >
  </el-pagination>
</template>
<script setup lang="ts">
const props = defineProps({
  total: {
    type: Number,
    default: 0,
  },
  pageSize: {
    type: Number,
    default: 0,
  },
  pagenum: {
    type: Number,
    default: 1,
  },
});

const emit = defineEmits(["paginationChange"]);

const handleSizeClick = (newPage: number) => {
  emit("paginationChange", newPage);
};
</script>
<style lang="scss"></style>
